// 平台属性管理的请求文件
import request from '@/utils/request'

// 获取一级分类数据
export function category1() {
  return request({
    url: `/admin/product/getCategory1`,
    method: 'GET'
  })
}
// 获取二级分类
export function category2(category1Id) {
  return request({
    url: `/admin/product/getCategory2/${category1Id}`,
    method: 'GET'
  })
}
// 获取三级分类
export function category3(category2Id) {
  return request({
    url: `/admin/product/getCategory3/${category2Id}`,
    method: 'GET'
  })
}
// 获取商品基础属性
export function attrInfoList(data) {
  return request({
    url: `/admin/product/attrInfoList/${data.category1Id}/${data.category2Id}/${data.category3Id}`,
    method: 'GET'
  })
}
// 添加属性与属性值的接口
export function saveAttrInfo(data) {
  return request({
    url: '/admin/product/saveAttrInfo',
    method: 'POST',
    data: data
  })
}

// 删除商品属性
export function deleteAttr(attrId) {
  return request({
    url: `/admin/product/deleteAttr/${attrId}`,
    method: 'DELETE'
  })
}

//

